#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.65])
AC_INIT([kOTF], [0.2], [dkosmari@gmail.com])
AC_SUBST(KOTF_VERSION, 0.3)
AC_CONFIG_SRCDIR([include/kotf/kotf.hpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])

AM_INIT_AUTOMAKE

LT_INIT

# Checks for programs.
AC_PROG_CXX
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET

# Checks for libraries.
BOOST_REQUIRE(1.48, [AC_MSG_ERROR([kOTF depends on Boost, but it was not found in your system])])
BOOST_FILESYSTEM(mt)
BOOST_REGEX(mt)
BOOST_THREADS(mt)


# Checks for header files.
AC_CHECK_HEADERS([stdint.h fcntl.h unistd.h])
AC_HEADER_STDBOOL

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UINT64_T
AC_TYPE_SIZE_T

# Checks for library functions.
AC_SEARCH_LIBS(clock_gettime, rt)
AC_FUNC_MMAP
AC_FUNC_STRERROR_R


AC_CONFIG_FILES([Makefile
                 doc/Makefile
                 examples/Makefile
                 include/Makefile
                 include/kotf/Makefile
                 src/Makefile
                 tools/Makefile
                 kotf.pc])
AC_OUTPUT
